package com.itheima.mString;

import com.itheima.domain.Worker;

import java.util.Scanner;

/*
     打印工人
 */
public class Work01 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Worker w = new Worker();
        System.out.println("请录入工人姓名:");
        String name = sc.next();
        w.setName(name);
        System.out.println("请录入工人年龄:");
        String year = sc.next();
        w.setYear(year);
        System.out.println("该工人的属性信息如下:");
        System.out.println("姓名:" + w.getName());
        System.out.println("年龄:" + w.getYear());
    }
}
